package cn.com.chengmandian.bike.service;

import cn.com.chengmandian.bike.dto.MemberCouponDto;
import cn.com.chengmandian.bike.model.EbMemberCoupon;
import cn.com.chengmandian.bike.model.vo.MemberCouponVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 电单车运营-用户优惠券表 服务类
 * </p>
 *
 * @author AutoGenerator
 * @since 2021-12-15
 */
public interface IEbMemberCouponService extends IService<EbMemberCoupon> {

    IPage<MemberCouponVo> pages(MemberCouponDto memberCouponDto, Integer memberId);

    List<MemberCouponVo> availableList(Integer areaId, Integer memberId, Integer infoType, String nowTime);

    List<MemberCouponVo> availableList(Integer areaId, Integer memberId, Integer infoType, String nowTime, Integer defaultRecordId);

    MemberCouponVo findOneCoupon(Integer areaId, Integer memberId, Integer type, BigDecimal thresholdMoney);

    MemberCouponVo getByCouponId(Integer couponRecordId);

    void useCoupon(Integer couponId);

    void createByRegister(Integer areaId, Integer memberId);

    MemberCouponVo getByCouponId(Integer areaId, Integer memberId, Integer type, BigDecimal thresholdMoney, Integer couponRecordId, Date useTime);

    void cancelUseCoupon(Integer couponId);
}
